//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "integration\fn_exportMissionObject.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_object","_name","_instance_id"];
DEFAULT_PARAM(_object,0,objNull);
DEFAULT_PARAM(_name,1,"");
DEFAULT_PARAM(_instance_id,2,"");

if (isnil QGVAR(EXPORTING_OBJECT_BUSY)) then { GVAR(EXPORTING_OBJECT_BUSY) = false; };

waituntil {!GVAR(EXPORTING_OBJECT_BUSY)};
GVAR(EXPORTING_OBJECT_BUSY) = true;

if (isnil QUOTE(EXPORT_VARIABLE)) then { EXPORT_VARIABLE = []; };
EXPORT_VARIABLE set [count EXPORT_VARIABLE,[_object,_name,_instance_id]];

GVAR(EXPORTING_OBJECT_BUSY) = false;

TRACE("End");
TMFPROFILERSTOP;